Method and apparatus for encoding a mesh model, encoded mesh model, and method and apparatus for decoding a mesh model

ABSTRACT

For most large 3D engineering models, the instance positions of repeating instances of connected components show significant multiple spatial aggregation. The invention uses several KD-trees, each for one cluster of points which are spatially aggregated. The multiple KD-trees generate a relatively short data stream, and thus improve the total compression ratio. A method for encoding points of a 3D mesh model comprises steps of determining that the mesh model comprises repeating instances of a connected component, and determining for each repeating instance at least one reference point, clustering the reference points of the repeating instances into one or more clusters, and encoding the clustered reference points using KD-tree coding, wherein for each cluster a separate KD-tree is generated.

This application claims the benefit, under 35 U.S.C. §365 ofInternational Application PCT/CN2009/001143, filed Oct. 15, 2009, whichwas published in accordance with PCT Article 21(2) on Apr. 21, 2011 inEnglish.

FIELD OF THE INVENTION

This invention relates to a method and an apparatus for encoding a meshmodel, an encoded mesh model and a method and apparatus for decoding amesh model.

BACKGROUND

Large 3D engineering models like architectural designs, chemical plantsand mechanical CAD (computer-aided design) designs are increasinglybeing deployed in various virtual world applications, such as SecondLife™ and Google Earth™ In most engineering models there are a largenumber of small to medium sized connected components, each having up toa few hundred polygons on average. A subset of a mesh model is aconnected component if there exists a path between any two polygons init, as defined in [SBM01]¹. Moreover, this type of models has a numberof geometric features that is repeated in various positions, scales andorientations. ¹ [SBM01]: D. Shikhare, S. Bhakar and S. P. Mudur.“Compression of Large 3D Engineering Models using Automatic Discovery ofRepeating Geometric Features”, Nov. 21-23, 2001, Stuttgart, Germany

Various algorithms have been proposed to compress 3D meshes efficientlysince the early 1990s. Early work however mostly concentrates oncompressing single connected 3D models with smooth surface and smalltriangles. For multi-connected 3D models (3D models containing multipleconnected components), such as large 3D engineering models, thecomponents are compressed separately. This causes a relativelyineffective compression. In fact, the compression performance can begreatly increased by removing the redundancy between different connectedcomponents.

A method for automatically discovering repeating geometric features inlarge 3D engineering models is proposed in [SBM01]. However, much roomis left for more efficient compression of 3D engineering models. E.g.,no compression solution is provided that covers transformationinformation of repeated instances, which is necessary for restoring theoriginal model. Considering the large size of connected components thata 3D engineering model usually has, this kind of information willconsume a big amount of storage. Further, if PCA (Principal ComponentAnalysis) of positions of vertices of a component is used, componentswith same geometry and different connectivity will have the same meanand same orientation axes. The state of the art is not suitable fordetecting and/or compressing repeating patterns in various scales. Twocomponents that differ only in scale (i.e. size) are not recognized asrepeating features of same equivalence class. Further, it is desirableto achieve a higher compression ratio than described in [SBM01].

[OG00]² discloses a KD-tree based compression algorithm to encode themeans of all connected components of a mesh model. This algorithmsubdivides with each iteration a cell into two child cells, and encodesthe number of vertices in one of the two child cells. If the parent cellcontains p vertices, the number of vertices in one of the child cellscan be encoded using log₂(p+1) bits with an arithmetic coder. Thissubdivision is recursively applied, until each non-empty cell is smallenough to contain only one vertex and enables a sufficiently precisereconstruction of the vertex position. It is mentioned in [OG00] thatthe algorithm is most efficient for non-uniform distributions, withregular distribution being the worst case. ² [OG00]: O. Devillers, P.Gandoin. “Geometric compression for interactive transmission”, in: IEEEVisualization, 2000, pp. 319-326

SUMMARY OF THE INVENTION

The invention is based on the recognition of the fact that for mostlarge 3D engineering models the instance positions of repeatinginstances of connected components show significant multiple spatialaggregation, and that for this case the efficiency of the algorithmdescribed in [OG00] can be improved. That is, repeating instances withina large 3D mesh model are often distributed such that several instancesare within one or few small regions, but in other relatively largeregions there are no instances. If a single KD-tree is used to organizeand compress such type of point data sets, as proposed in [OG00], theKD-tree will be unreasonably deep, which will make the output datastream longer than necessary.

The present invention provides an improvement for this case. Accordingto the present invention, several KD-trees are used, each for onecluster of points which are spatially aggregated. Those KD-trees willgenerate a relatively short data stream, and thus improve the totalcompression ratio.

In one aspect, the present invention provides a method for encodingpoints of a mesh model. The method comprises steps of determining thatthe mesh model comprises repeating instances of a connected component,and determining for each repeating instance at least one referencepoint, clustering the reference points of the repeating instances intoone or more clusters, and encoding the clustered reference points usingKD-tree coding, wherein for each cluster a separate KD-tree isgenerated.

According to another aspect of the invention, an apparatus for encodingpoints of a mesh model comprises analyzing means for determining thatthe mesh model comprises repeating instances of a connected component,determining means for determining for each repeating instance at leastone reference point, clustering means for clustering the referencepoints of the repeating instances into one or more clusters, andencoding means for encoding the clustered reference points using KD-treecoding, wherein for each cluster a separate KD-tree is generated.

According to a further aspect of the invention, a method for decodingpoints of an encoded mesh model comprises steps of extracting data foran instance of a repeating connected component, decoding the instance ofthe connected component using said extracted data, extracting first datadefining a number of clusters, second data defining a spatial resolutionand third data being positions of a plurality of repetitions of saidrepeating connected component, wherein the third data are encoded as aKD-tree, extracting fourth data that define a portion within the meshmodel, and determining the positions of the plurality of repetitions ofsaid repeating connected component from the third data and the fourthdata, wherein the third data are applied to the portion of the meshmodel that is defined by the fourth data.

According to yet another aspect of the invention, an apparatus fordecoding points of an encoded mesh model comprises first extractionmeans for extracting data for an instance of a repeating connectedcomponent from the encoded mesh model, decoding means for decoding theinstance of the connected component using said extracted data, secondextraction means for extracting first data that define a number ofclusters, second data defining a spatial resolution and third data beingpositions of a plurality of repetitions of said repeating connectedcomponent, wherein the third data are encoded as a KD-tree, furtherthird extraction means for extracting fourth data defining a portionwithin the mesh model, and determining means for determining thepositions of the plurality of repetitions of said repeating connectedcomponent from the third data and the fourth data, wherein the thirddata are applied to the portion of the mesh model that is defined by thefourth data.

According to one aspect of the invention, an encoded mesh modelcomprising a plurality of repeating connected components, wherein theencoded mesh model comprises encoded data of at least one instance ofeach repeating connected component, positions of a plurality ofrepetitions of said repeating connected components, the positions beingencoded as a KD-tree, and a boundary region within the mesh model,wherein the KD-tree refers to said region.

Advantageous embodiments of the invention are disclosed in the dependentclaims, the following description and the figures.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments of the invention are described with reference tothe accompanying drawings, which show in

FIG. 1 the principle of KD-tree coding in a 2D example;

FIG. 2 a) positions of multiple instances of repeating connectedcomponents;

FIG. 2 b) the result of conventional KD-tree coding for the positions ofmultiple instances of repeating connected components;

FIG. 3 cluster positions after the clustering;

FIG. 4 the data structure of the encoded mesh model based on clusters;

FIG. 5 a 2D representation of an exemplary 3D mesh model of a meetingroom, consisting of 5574 connected components;

FIG. 6 an exemplary flow-chart of an encoding method and a decodingmethod; and

FIG. 7 an exemplary flow-chart of a clustering method.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 shows exemplarily the principle of conventional KD-tree coding ina 2D case. The 2D model is enclosed by a bounding box 10, which iscalled parent cell. Seven vertices are positioned within the parentcell. The KD-tree encoding algorithm starts with encoding the totalnumber of vertices using a predefined number of bits, and thensubdivides the cells recursively. Each time it subdivides a parent cellinto two child cells, it encodes the number of vertices in one of thetwo child cells. By convention, this may be the left child cell (aftervertical splitting) or the upper cell (after horizontal splitting). Ifthe parent cell contains p vertices, the number of vertices in one ofthe child cells can be encoded using log₂(p+1) bits with an arithmeticcoder. This subdivision is recursively applied, until each non-emptycell is small enough to contain only one vertex and enable asufficiently precise reconstruction of the vertex position. Forcompressing the positions of all repeated instances, the entirebounding-box 10 of all the positions is regarded as a parent cell in thebeginning. In the example of FIG. 1, the total number of vertices(seven) is encoded using 32 bits. Then vertical splitting is applied, sothat a left child cell V1 and a right child cell V2 are obtained. In thenext coding step, the number of vertices in the left child cell V1,which is four, is encoded. The number of bits used for the encoding isdetermined by the number of vertices within the parent cell: it islog₂(7+1)=3 bits. From the number of vertices in the parent cell and thenumber of vertices in the left child cell V1, the number of vertices inthe right child cell V2 can be deduced, and therefore needs not beencoded.

In the next step, horizontal splitting is applied. The left child cellV1, which is now a parent cell V1, is split into an upper child cellV1H1 and a lower child cell V1H2. The right child cell V2, which is nowa parent cell V2, is split into an upper child cell V2H1 and a lowerchild cell V2H2. The encoding continues with the upper left child cellV1H1, which has two vertices. Thus, the number 2 is encoded next,wherein log₂(4+1)=2.3 bits are used in an arithmetic coder. As describedabove, the number of vertices in the lower left child cell V1H2 needsnot be encoded since it can be deduced from the number of vertices inthe left cell V1 and in the upper left child cell V1H1. Then, the sameprocedure is applied to the right cell V2, which results in encoding azero using two bits. As shown in FIG. 1, two more splitting steps arenecessary until each vertex is in a separate cell, and even more stepsare necessary until each vertex is sufficiently localized within itscell. Each step requires the encoding of a growing number of ones orzeros. Depending on the required accuracy, the number of additionalsteps may be high.

The above-mentioned prior art document [OG00] suggests that a singleKD-tree provides an optimized compression. However, it has been foundthat in the case of spatially aggregated points there is additionalredundancy, which may be reduced with the invention. Spatial aggregationof points means that for multiple subsequent splitting operations alwaysone of the child cells is empty. Therefore, any level (k+1) will consumethe same number of bits as its parent level k if the points arespatially aggregated. In principle, conventional use of KD-treesimproves the compression ratio by making each level of a KD-tree narrow.The present invention improves the compression ratio by using multipleKD-trees and making each KD-tree have fewer levels.

The present invention applies the KD-tree coding algorithm not only forencoding vertex positions, but for encoding positions of repeatingconnected components. FIG. 2 a) shows an example where multiplerepeating connected components 21-24 are positioned within the boundarybox 20 of a 3D mesh model. As is the case in many large 3D mesh models,the positions are very unevenly distributed within the bounding box. Ifonly the KD-tree coding algorithm is applied for encoding the positions,an exemplary result is shown in FIG. 2 b). It can be seen that fiveinitial splitting steps are required before the clusters are localized.That is, in the example of FIG. 2 the code will be as follows: 12 (totalnumber)-6 (left child cell 1^(st) generation)-6-3 (upper child cells2^(nd) gen.)-2-3-0 (L, 3^(rd) gen.)-2-0-0-0 (up, 4^(th) gen.)-2-4-0-3(L, 5^(th) gen.)-2-0-3-0 (up, 6^(th) gen.), resulting in12-6-6-3-2-3-0-2-0-0-0-2-4-0-3-2-0-3-0. The assignment of number of bitsis as described above. Further data may be required for a more exactposition. Thus, the code comprises either numerous repetitions ofprevious values, or zeros.

With the present invention, both the procedure and the resulting codeare substantially shorter. According to one aspect of the invention, thepoints are clustered, i.e. clusters are created and if possible, thepoints are assigned to the clusters. The points shown in FIG. 2 can beclustered advantageously in a manner as shown in FIG. 3. In thisexample, four clusters 31-34 are within the bounding box 30. Generally,the clustering comprises selecting a first cell that was not yetclustered and that comprises one or more points, and defining a clusterthat comprises the first cell, or the one or more points within thefirst cell.

In one embodiment, as shown in FIG. 6 a), a method for encoding pointsof a mesh model comprises steps of determining E1 that the mesh modelcomprises repeating instances of a connected component, and determiningE2 for each repeating instance at least one reference point, clusteringE3 the reference points of the repeating instances into one or moreclusters, and encoding E4 the clustered reference points using KD-treecoding, wherein for each cluster a separate KD-tree is generated.

In one embodiment, the clustering comprises steps of defining a boundingbox around the mesh model, dividing the bounding box into cells, whereina cell is a smallest spatial resolution unit, selecting a first cellthat was not yet clustered and that comprises one or more referencepoints of a repeating instance, and defining a cluster that comprisessaid first cell, or the one or more reference points within said firstcell. Generally, the first cell is a candidate for creating a newcluster. In one embodiment, one cell is sufficient for creating acluster. In another embodiment, at least two adjacent cells that includeone or more points each are required for creating a cluster. In yetanother embodiment, a predefined minimum number of points within anynumber of adjacent cells are required for creating a cluster.

In one embodiment, the first cell is only selected if it was not yetclustered and if it comprises at least M points (e.g. reference pointsof M repeating instances). In one embodiment, M is a user definableparameter. A corresponding encoding method comprises a step of defininga parameter M, wherein M is the minimum number of points within a cell,in order for selecting the cell as source for creating a new cluster.

In one embodiment, the clustering may further comprise steps ofdetermining one or more further cells, wherein the further cells areneighbouring cells or recursively neighbouring cells (i.e. neighbours ofneighbours etc.) of the selected first cell, and wherein each of thedetermined further cells comprises at least one reference point of arepeating instance, and adding said determined neighbouring cell orcells to said cluster.

In one embodiment, the clustering further comprises a step of sortingall cells in ascending or descending order of the number of referencepoints in each cell, and the first cells (the candidates for creating anew cluster) are selected according to said order.

For many large 3D engineering models, such as the exemplary meeting roomshown in FIG. 5, the instance positions shows significantly multiplespatial aggregation. If one single KD-tree is used to organize andcompress such type of point datasets, the KD-tree will be unreasonablydeep. On the other side, if several KD-trees are used, each for onecluster of points which are spatially aggregated, the KD-trees willgenerate a relatively short data stream and thus improve the totalcompression ratio. For example, in the 3D model of a meeting roomconsisting of 5574 connected components, as shown in FIG. 5, and themultiple repeating connected components are chairs RCC1, repeatingtexture elements of a carpet RCC2 or repeating constructional elementsRCC3 of a candelabrum. To enable compact storage and fast transmissionof large 3D engineering models, the invention provides an efficientcompression strategy that is particularly advantageous for encoding thepositions of all repeated instances. In one aspect, the inventionprovides an efficient compression method for discrete points, especiallyfor those that show significantly multiple spatial aggregation. Thepositions of repeated instances in a large 3D engineering model oftenhave such kind of characteristics.

The invention provides a clustered KD-tree based compression algorithmfor efficiently compressing discrete point data sets with significantlymultiple spatial aggregation. The input points are first clusteredaccording to their spatial positions. Each cluster contains a set ofpoints which are spatially aggregated. Then each cluster is compressedby organizing all the points belonging to it by one KD-tree.

In the following, an exemplary clustering method for encoding isdescribed. Let C_Point denote all the point clusters. In the beginning,C_Point is empty.

Step 1: Subdivide the whole bounding-box of all the points to becompressed into N*N*N cells.

Step 2: Sort all the cells into a queue Q_Cell according to theascending order of the number of points falling into each cell.

Step 3: If (Q_Cell is not empty)

-   -   Pop a cell P from Q_Cell. Skip empty cells. Goto Step 4.    -   Else Goto Step 6.

Step 4: If (P doesn't belong to any cluster in C_Point)

-   -   Generate a new cluster C, only including P, and add C into        C_Point.    -   Goto Step 5.    -   Else Goto Step 3.

Step 5: Check all neighbor cells of all cells in C.

-   -   Let P1 denote any neighbor cell of any cell in C.    -   If ((the number of points falling into P1>B) && (P1 does not        belong to any cluster in C_Point)) Add P1 into C.        -   (B is a user specified threshold.)    -   After finishing the check for all neighbour cells, goto Step 3.

Step 6: Compress the points falling into the cells belonging to the samecluster in C_Point independently. Each cluster is compressed byorganizing the corresponding points, using a separate KD-tree andcompressing them e.g. based on [OG00].

The user-defined parameter B specifies how many points there must be ina cell in order for the cell to be added as neighbour to a cluster.While in one embodiment B=1, other embodiments may required highervalues of B. A flow-chart of the clustering method is shown in FIG. 7.

The syntax of a resulting bit-stream may be as shown in Tab.1. ae(v)means arithmetic coding, something similar to the arithmetic coding inH.264/AVC.

TABLE 1 Bit-stream syntax of instance positions Instance_position( ) {Descriptor   BoundaryBox_Of_All_Instance_Positions. ae  Num_Of_Clusters; ae   N; ae   for(i = 0; i < Num_Of_Clusters; i ++) {    Indices_of_Two_Boundary_Cells_of_cluster[i]; ae    KD-tree_of_current_cluster;   }

The semantics of the exemplary bit-stream are as follows:BoundaryBox_Of_All_Instance_Positions indicates the bounding-box of allinstance positions.

Num_Of_Clusters indicates the number of clusters.

N indicates the resolution of the cells, i.e. N in Step 1 of theabove-described encoding procedure.

Indices_of_Two_Boundary_Cells_of_cluster[i] indicates the index of thetwo cells that define the bounding-box of a cluster[i]. It has2*Log₂(n*n*n) bits.

KD-tree_(—) of_current_cluster denotes bits for recording the KD-tree ofa current cluster.

In one embodiment, during encoding, there is after the actual clusteringa step of determining the boundary of each cluster, and correspondingtwo boundary cells. The boundary can be expressed by indices of the twoboundary cells. The boundary cells of a current cluster are cells withminimum indices and maximum indices of each dimension. E.g. if in a 2Dcase the points belonging to a cluster are in a range of{x_(min),x_(max)} and {y_(min),y_(max)}, then the boundary cells are atx_(min), y_(min) and x_(max), y_(max), even though these cells areactually not within the cluster. However their indices are used in orderto define a local bounding-box for the current cluster. Within the localbounding-box, local coordinates may be used, which reduces the amount ofbits.

In one embodiment, calculating the KD-tree for a current cluster hassteps of calculating the relative positions of instances falling intothe current cluster[i], and calculating the corresponding instancepositions in the world coordinate system outside the bounding-box.

In one embodiment, the encoding method further comprises a step ofdefining a spatial resolution of the mesh model, e.g. N in Tab.1. Inthis case, a cell is the smallest spatial resolution unit according tothe defined spatial resolution. The spatial resolution has an impact onthe exactness of the reconstruction, since a position that is somewherewithin a particular cell during encoding can after decoding bereproduced only at a predefined position within the cell, e.g. in thecenter of the cell. For a more exact location, a higher spatialresolution is necessary. In one embodiment, N is predefined. In anotherembodiment, N can be selected according to quality requirements, e.g. itcan be reduced for reproduction on low-resolution displays.

As described above, the prior art methods are ineffective when thepoints are distributed very inhomogeneously. In one embodiment, theencoding method further comprises steps of determining a measure ofspatial homogeneity of points (wherein the measure of spatialhomogeneity is high if the points are evenly distributed and lower ifthe distribution is more uneven), comparing the spatial homogeneity to athreshold, and performing the clustering only if the spatial homogeneityis below the threshold. E.g., the encoding method may comprise steps ofdetermining a measure of spatial homogeneity of reference points of therepeating instances, comparing the spatial homogeneity to a threshold,and performing the clustering only if the spatial homogeneity is belowthe threshold (i.e. if the distribution of points is veryinhomogeneous).

In one embodiment, the encoding method further comprises steps ofmodifying the spatial resolution if the spatial homogeneity is below thethreshold, measuring the spatial homogeneity and repeating these stepsuntil the spatial homogeneity is not below the threshold.

FIG. 4 shows a data structure of an encoded mesh model based onclusters. A root, referring to a particular type of connected componentand a complete 3D mesh model, comprises at least one cluster that refersto a repeating connected component and that is represented as a KD-treeKD-T1, . . . , KD-T3.

In the example of FIG. 4, the connected component root CCr stands for aparticular connected component. For example the connected component maybe a particular type of screw in a 3D engineering mesh model. In theexample, there are three areas within the 3D model where this type ofscrews is used very often. Each of the areas is denoted as a cluster,which is represented by a separate KD-tree KD-T1, . . . , KD-T3. Few orsingle instances of the connected component may also appear in otherareas. In one embodiment, these instances are not clustered, but theirpositions are described in a separate structure T4, e.g. a specialKD-tree or just a list of coordinates. Each of the three clusterKD-trees KD-T1, . . . , KD-T3 refers to one cluster of multipleinstances of the connected component and includes location information,e.g. indices of the cluster's boundary cells.

In the following, further embodiments of the invention are described.

In one embodiment, an apparatus for encoding points of a mesh modelcomprises determining means for determining that the mesh modelcomprises repeating instances of a connected component, and determiningmeans for determining for each repeating instance at least one referencepoint, clustering means for clustering the reference points of therepeating instances into one or more clusters, and encoding means forencoding the clustered reference points using KD-tree coding, whereinfor each cluster a separate KD-tree is generated.

In one embodiment, the means for clustering comprises defining means fordefining a bounding box around the mesh model, dividing means fordividing the bounding box into cells, wherein a cell is a smallestspatial resolution unit, selection means for selecting a first cell thatwas not yet clustered and that comprises one or more reference points ofa repeating instance, and defining means for defining a cluster thatcomprises said first cell, or the one or more reference points withinsaid first cell.

In one embodiment, the apparatus further comprises determining means fordetermining one or more further cells, wherein the further cells areneighbouring cells or recursively neighbouring cells of the selectedfirst cell and wherein each of the determined further cells comprises atleast one reference point of a repeating instance, and adding means foradding said determined neighbouring cell or cells to said cluster.

In one embodiment, the clustering means further comprises organizingmeans for sorting all cells in ascending or descending order of thenumber of reference points in each cell, wherein the first cells (i.e.initial cells of a cluster) are selected according to said order.

In one embodiment, the clustering means comprises means for determiningboundary cells of a current cluster (being the cells with minimumindices and maximum indices of each dimension).

In one embodiment, the encoding apparatus further comprises means fordefining a spatial resolution, wherein a cell is the smallest spatialresolution unit according to said defined spatial resolution.

In one embodiment, the encoding apparatus further comprises analyzingmeans for determining a measure of spatial homogeneity of referencepoints of the repeating instances, wherein the measure of spatialhomogeneity is high if the reference points are evenly distributed andlower if the distribution is more uneven, comparator means for comparingthe spatial homogeneity to a threshold, and control means forcontrolling that the clustering is performed only if the spatialhomogeneity is below the threshold.

In one embodiment, an encoded mesh model comprises a plurality ofrepeating connected components, wherein the encoded mesh model comprisesencoded data of at least one instance of each repeating connectedcomponent, positions of a plurality of repetitions of said repeatingconnected components, the positions being encoded as a KD-tree, and aboundary region within the mesh model, wherein the KD-tree refers tosaid region.

In one embodiment, the data of the boundary region of the encoded meshmodel comprise indices of boundary cells.

In one embodiment shown in FIG. 6 b), a method for decoding points of anencoded mesh model comprises steps of extracting D1 data for an instanceof a repeating connected component, decoding D2 the instance of theconnected component using said extracted data, extracting D3 first data(Num_Of_Clusters) defining a number of clusters, second data (N)defining a spatial resolution and third data (KD-T1, . . . , KD-T3)being positions of a plurality of repetitions of said repeatingconnected component, the third data being encoded as a KD-tree,extracting D4 fourth data (Index_Boundary_Cluster) defining a portionwithin the mesh model, and determining D5 the positions of the pluralityof repetitions of said repeating connected component from the third dataand the fourth data, wherein the third data are applied to the portionof the mesh model that is defined by the fourth data.

In one embodiment of the method for decoding, the fourth data(Index_Boundary_Cluster) comprises indices of two cells within the meshmodel, wherein a cell is a smallest spatial resolution unit according tothe spatial resolution defined by said second data.

Experiments show that for pattern position data, cluster based KD-treecompression according to the invention can save about 50% of storagespace (Clus_Comp/Coor_Comp), compared with the conventional KD-treebased compression.

In Tab.2, #C is the number of connected components, #P the number ofrepeating components, Coor.(K) the size of raw instances positions inKbyte, Coor_Comp (K) the size of compressed instance positions using oneKD-tree, #Clu the number of clusters and Clu_Coor_Comp (K) the size ofcompressed instance positions by clustered KD-tree based compressionmethod.

TABLE 2 Exemplary compression efficiency for 2 example models Coor.Coor_Comp # Clu_Comp Clu_Comp/ Model #C #P (K) (K) Clu (K) Coor_Comp(%)Viewing Room 1382 62 15.52 9.86 6 5.56 56.39% VIP Room 5554 392 62.3347.7 10 19.9 41.72%

While there has been shown, described, and pointed out fundamental novelfeatures of the present invention as applied to preferred embodimentsthereof, it will be understood that various omissions and substitutionsand changes in the apparatus and method described, in the form anddetails of the devices disclosed, and in their operation, may be made bythose skilled in the art without departing from the spirit of thepresent invention. Although the present invention has been disclosedwith regard to instance positions of repeating connected components, oneskilled in the art would recognize that the method and devices describedherein may in principle be applied to any scenario regarding compressionof a group of discrete points. It is expressly intended that allcombinations of those elements that perform substantially the samefunction in substantially the same way to achieve the same results arewithin the scope of the invention. Substitutions of elements from onedescribed embodiment to another are also fully intended andcontemplated.

It will be understood that the present invention has been describedpurely by way of example, and modifications of detail can be madewithout departing from the scope of the invention. Each featuredisclosed in the description and (where appropriate) the claims anddrawings may be provided independently or in any appropriatecombination. Features may, where appropriate be implemented in hardware,software, or a combination of the two. Reference numerals appearing inthe claims are by way of illustration only and shall have no limitingeffect on the scope of the claims.

The invention claimed is:
 1. A computer implemented method for encodingpoints of a 3D mesh model to generate a bitstream for storage and/ortransmission, comprising steps of determining, using a computer, thatthe 3D mesh model comprises repeating instances of a connectedcomponent, and determining for each repeating instance at least onereference point; clustering, using the computer, the reference points ofthe repeating instances into one or more clusters; and encoding, usingthe computer, the clustered reference points using KD-tree coding intothe bitstream, wherein for each cluster a separate KD-tree is generated.2. Method according to claim 1, wherein the clustering comprises stepsof defining a bounding box around the 3D mesh model; dividing thebounding box into cells, wherein a cell is a smallest spatial resolutionunit; selecting a first cell that was not yet clustered and thatcomprises one or more reference points of a repeating instance; anddefining a cluster that comprises said first cell, or the one or morereference points within said first cell.
 3. Method according to claim 2,wherein said first cell is only selected if it was not yet clustered andcomprises at least M reference points of M repeating instances, whereinM is a user definable parameter.
 4. Method according to claim 2, furthercomprising steps of determining one or more further cells, wherein thefurther cells are neighbouring cells or recursively neighbouring cellsof the selected first cell and wherein each of the determined furthercells comprises at least one reference point of a repeating instance;and adding said determined neighbouring cell or cells to said cluster.5. Method according to claim 2, wherein the clustering further comprisesa step of sorting all cells in ascending or descending order of thenumber of reference points in each cell, and wherein the first cells areselected according to said order.
 6. Method according to claim 1,wherein the clustering comprises a step of determining boundary cells ofa current cluster (being the cells with minimum indices and maximumindices of each dimension).
 7. Method according to claim 1, furthercomprising a step of defining a spatial resolution, wherein a cell isthe smallest spatial resolution unit according to said defined spatialresolution.
 8. Method according to claim 1, further comprising steps ofdetermining a measure of spatial homogeneity of reference points of therepeating instances, wherein the measure of spatial homogeneity is highif the reference points are evenly distributed and lower if thedistribution is more uneven; comparing the spatial homogeneity to athreshold; and performing the clustering only if the spatial homogeneityis below a threshold.
 9. Method according to claim 8, further comprisingsteps of modifying the spatial resolution if the spatial homogeneity isbelow the threshold; and repeating the step of determining a measure ofspatial homogeneity.
 10. Non-transitory storage medium having storedthereon an encoded 3D mesh model obtained by the method of claim 1,wherein the encoded 3D mesh model comprises a plurality of repeatingconnected components and encoded data of at least one instance of eachrepeating connected component; positions of a plurality of repetitionsof said repeating connected components, the positions being encoded as aKD-tree; and a boundary region within the mesh model, wherein theKD-tree refers to said region.
 11. Non-transitory storage mediumaccording to claim 10, wherein the encoded data of the boundary regioncomprise indices of boundary cells.
 12. An apparatus for encoding pointsof a 3D mesh model, comprising: a computer having one or more processorand memory for storing program instructions, wherein the instructionscomprise: a determining module configured to determine that the meshmodel comprises repeating instances of a connected component, and meansfor determining for each repeating instance at least one referencepoint; a clustering module configured to cluster the reference points ofthe repeating instances into one or more clusters; and an encoderconfigured to encode the clustered reference points using KD-treecoding, wherein for each cluster a separate KD-tree is generated. 13.Apparatus according to claim 12, wherein the clustering module comprisesa bounding box definer module configured to define a bounding box aroundthe 3D mesh model; a divider configured to divide the bounding box intocells, wherein a cell is a smallest spatial resolution unit; a selectorconfigured to select a first cell that was not yet clustered and thatcomprises one or more reference points of a repeating instance; and acluster definer module configured to define a cluster that comprisessaid first cell, or the one or more reference points within said firstcell.
 14. Apparatus according to claim 12, further comprising adetermining module configured to determine one or more further cells,wherein the further cells are neighbouring cells or recursivelyneighbouring cells of the selected first cell and wherein each of thedetermined further cells comprises at least one reference point of arepeating instance; and an adder configured to add said determinedneighbouring cell or cells to said cluster.
 15. Apparatus according toclaim 12, wherein the clustering module further comprises a sorterconfigured to sort all cells in ascending or descending order of thenumber of reference points in each cell, and wherein the first cells areselected according to said order.
 16. Apparatus according to claim 12,wherein the clustering module comprises a to determine boundary cells ofa current cluster, the boundary cells being the cells with minimumindices and maximum indices of each dimension.
 17. Apparatus accordingto claim 12, further comprising a spatial resolution defining moduleconfigured to define a spatial resolution, wherein a cell is thesmallest spatial resolution unit according to said defined spatialresolution.
 18. Apparatus according to claim 12, further comprising ameasuring module configured to determine a measure of spatialhomogeneity of reference points of the repeating instances, wherein themeasure of spatial homogeneity is high if the reference points areevenly distributed and lower if the distribution is more uneven; acomparator configured to compare the spatial homogeneity to a threshold;and a conditional clustering module configured to perform the clusteringonly if the spatial homogeneity is below the threshold.
 19. A computerimplemented method for decoding points of an encoded 3D mesh model froma bitstream, comprising steps of extracting, using a computer, data foran instance of a repeating connected component; decoding, using thecomputer, the instance of the connected component using said extracteddata; extracting, using the computer, first data defining a number ofclusters, second data defining a spatial resolution and third data beingpositions of a plurality of repetitions of said repeating connectedcomponent, the third data being encoded as a KD-tree; extracting, usingthe computer, fourth data defining a portion within the 3D mesh model;determining, using the computer, the positions of the plurality ofrepetitions of said repeating connected component from the third dataand the fourth data, wherein the third data are applied to the portionof the 3D mesh model that is defined by the fourth data.
 20. Methodaccording to claim 19, wherein the fourth data comprises indices of twocells within the 3D mesh model, a cell being a smallest spatialresolution unit according to the spatial resolution defined by saidsecond data.